package com.esri.core.geometry;

import com.esri.core.geometry.Geometry;
import com.esri.core.internal.util.f;
import com.github.mikephil.charting.utils.Utils;
import java.util.ArrayList;
import java.util.List;
import org.codehaus.jackson.JsonParser;

/* loaded from: classes.dex */
public class GeometryEngine {
    static {
        a();
    }

    public static Geometry project(Geometry geometry, SpatialReference spatialReference, SpatialReference spatialReference2) {
        return GeometryEngineCore.project(geometry, spatialReference, spatialReference2);
    }

    public static Point project(double d, double d2, SpatialReference spatialReference) {
        return GeometryEngineCore.project(d, d2, spatialReference);
    }

    public static Geometry project(Geometry geometry, SpatialReference spatialReference, SpatialReference spatialReference2, GeographicTransformation geographicTransformation) {
        return GeometryEngineCore.project(geometry, spatialReference, spatialReference2, geographicTransformation != null ? new CompositeGeographicTransformation().add(geographicTransformation) : null);
    }

    public static Geometry project(Geometry geometry, SpatialReference spatialReference, SpatialReference spatialReference2, CompositeGeographicTransformation compositeGeographicTransformation) {
        return GeometryEngineCore.project(geometry, spatialReference, spatialReference2, compositeGeographicTransformation);
    }

    public static Geometry project(Geometry geometry, ProjectionTransformation projectionTransformation) {
        return project(geometry, projectionTransformation.getInputSR(), projectionTransformation.getOutputSR(), projectionTransformation.getGeoTransformation());
    }

    public static List<CompositeGeographicTransformation> getTransformations(SpatialReference spatialReference, SpatialReference spatialReference2, Envelope envelope, int i) {
        return GeometryEngineCore.getTransformations(spatialReference, spatialReference2, envelope, i);
    }

    public static List<CompositeGeographicTransformation> getTransformations(SpatialReference spatialReference, SpatialReference spatialReference2) {
        return GeometryEngineCore.getTransformations(spatialReference, spatialReference2, new Envelope(), 0);
    }

    public static MapGeometry jsonToGeometry(JsonParser jsonParser) {
        return GeometryEngineCore.jsonToGeometry(jsonParser);
    }

    public static String geometryToJson(SpatialReference spatialReference, Geometry geometry) {
        return GeometryEngineCore.geometryToJson(spatialReference, geometry);
    }

    public static Geometry geometryFromEsriShape(byte[] bArr, Geometry.Type type) {
        return GeometryEngineCore.geometryFromEsriShape(bArr, type);
    }

    public static byte[] geometryToEsriShape(Geometry geometry) {
        return GeometryEngineCore.geometryToEsriShape(geometry);
    }

    public static Geometry union(Geometry[] geometryArr, SpatialReference spatialReference) {
        return GeometryEngineCore.union(geometryArr, spatialReference);
    }

    public static Geometry difference(Geometry geometry, Geometry geometry2, SpatialReference spatialReference) {
        return GeometryEngineCore.difference(geometry, geometry2, spatialReference);
    }

    public static boolean equals(Geometry geometry, Geometry geometry2, SpatialReference spatialReference) {
        return GeometryEngineCore.equals(geometry, geometry2, spatialReference);
    }

    static Geometry[] a(Geometry[] geometryArr, Geometry geometry, SpatialReference spatialReference) {
        return GeometryEngineCore.a(geometryArr, geometry, spatialReference);
    }

    public static Geometry intersect(Geometry geometry, Geometry geometry2, SpatialReference spatialReference) {
        return GeometryEngineCore.intersect(geometry, geometry2, spatialReference);
    }

    public static boolean within(Geometry geometry, Geometry geometry2, SpatialReference spatialReference) {
        return GeometryEngineCore.within(geometry, geometry2, spatialReference);
    }

    public static boolean intersects(Geometry geometry, Geometry geometry2, SpatialReference spatialReference) {
        return GeometryEngineCore.intersects(geometry, geometry2, spatialReference);
    }

    public static boolean contains(Geometry geometry, Geometry geometry2, SpatialReference spatialReference) {
        return GeometryEngineCore.contains(geometry, geometry2, spatialReference);
    }

    public static boolean crosses(Geometry geometry, Geometry geometry2, SpatialReference spatialReference) {
        return GeometryEngineCore.crosses(geometry, geometry2, spatialReference);
    }

    public static boolean touches(Geometry geometry, Geometry geometry2, SpatialReference spatialReference) {
        return GeometryEngineCore.touches(geometry, geometry2, spatialReference);
    }

    public static double distance(Geometry geometry, Geometry geometry2, SpatialReference spatialReference) {
        return GeometryEngineCore.distance(geometry, geometry2, spatialReference);
    }

    public static Geometry clip(Geometry geometry, Envelope envelope, SpatialReference spatialReference) {
        return GeometryEngineCore.clip(geometry, envelope, spatialReference);
    }

    public static Polygon[] buffer(Geometry[] geometryArr, SpatialReference spatialReference, double[] dArr, Unit unit, boolean z) {
        return GeometryEngineCore.buffer(geometryArr, spatialReference, dArr, unit, z);
    }

    public static Polygon buffer(Geometry geometry, SpatialReference spatialReference, double d, Unit unit) {
        return GeometryEngineCore.buffer(geometry, spatialReference, d, unit);
    }

    public static Proximity2DResult getNearestCoordinate(Geometry geometry, Point point, boolean z) {
        return GeometryEngineCore.getNearestCoordinate(geometry, point, z);
    }

    public static Proximity2DResult getNearestVertex(Geometry geometry, Point point) {
        return GeometryEngineCore.getNearestVertex(geometry, point);
    }

    public static Proximity2DResult[] getNearestVertices(Geometry geometry, Point point, double d, int i) {
        return GeometryEngineCore.getNearestVertices(geometry, point, d, i);
    }

    public static Geometry simplify(Geometry geometry, SpatialReference spatialReference) {
        return GeometryEngineCore.simplify(geometry, spatialReference);
    }

    static boolean a(Geometry geometry, SpatialReference spatialReference) {
        return GeometryEngineCore.a(geometry, spatialReference);
    }

    public static Geometry normalizeCentralMeridian(Geometry geometry, SpatialReference spatialReference) {
        return GeometryEngineCore.normalizeCentralMeridian(geometry, spatialReference);
    }

    public static double geodesicArea(Geometry geometry, SpatialReference spatialReference, AreaUnit areaUnit) {
        return GeometryEngineCore.geodesicArea(geometry, spatialReference, areaUnit);
    }

    public static double geodesicLength(Geometry geometry, SpatialReference spatialReference, LinearUnit linearUnit) {
        return GeometryEngineCore.geodesicLength(geometry, spatialReference, linearUnit);
    }

    /* loaded from: classes.dex */
    public enum JoinType {
        ROUND(0),
        BEVEL(1),
        MITER(2),
        SQUARE(3);
        
        private int a;

        JoinType(int i) {
            this.a = i;
        }

        public int a() {
            return this.a;
        }
    }

    public static List<Geometry> geodesicOffset(List<Geometry> list, SpatialReference spatialReference, double d, JoinType joinType, double d2, double d3) {
        return GeometryEngineCore.geodesicOffset(list, spatialReference, d, joinType, d2, d3, null);
    }

    public static List<Geometry> geodesicOffset(List<Geometry> list, SpatialReference spatialReference, double d) {
        return geodesicOffset(list, spatialReference, d, JoinType.SQUARE, (double) Utils.DOUBLE_EPSILON, (double) Utils.DOUBLE_EPSILON);
    }

    public static Geometry geodesicOffset(Geometry geometry, SpatialReference spatialReference, double d, JoinType joinType, double d2, double d3) {
        ArrayList arrayList = new ArrayList();
        arrayList.add(geometry);
        return geodesicOffset(arrayList, spatialReference, d, joinType, d2, d3).get(0);
    }

    public static Geometry geodesicOffset(Geometry geometry, SpatialReference spatialReference, double d) {
        ArrayList arrayList = new ArrayList();
        arrayList.add(geometry);
        return geodesicOffset(arrayList, spatialReference, d).get(0);
    }

    public static Geometry geodesicDensifyGeometry(Geometry geometry, SpatialReference spatialReference) {
        return geodesicDensifyGeometry(geometry, spatialReference, 10000.0d, null);
    }

    public static Geometry geodesicDensifyGeometry(Geometry geometry, SpatialReference spatialReference, double d, LinearUnit linearUnit) {
        return GeometryEngineCore.geodesicDensifyGeometry(geometry, spatialReference, d, linearUnit);
    }

    public static double geodesicDistance(Point point, Point point2, SpatialReference spatialReference, LinearUnit linearUnit) {
        return GeometryEngineCore.geodesicDistance(point, point2, spatialReference, linearUnit);
    }

    public static Geometry geodesicEllipse(Point point, SpatialReference spatialReference, double d, double d2, double d3, int i, LinearUnit linearUnit, Geometry.Type type) {
        return GeometryEngineCore.geodesicEllipse(point, spatialReference, d, d2, d3, i, linearUnit, type);
    }

    public static Polygon geodesicEllipse(Point point, SpatialReference spatialReference, double d, double d2, LinearUnit linearUnit) {
        return (Polygon) geodesicEllipse(point, spatialReference, d, d2, Utils.DOUBLE_EPSILON, 100, linearUnit, Geometry.Type.POLYGON);
    }

    public static List<Point> geodesicMove(List<Point> list, SpatialReference spatialReference, double d, LinearUnit linearUnit, double d2) {
        return GeometryEngineCore.geodesicMove(list, spatialReference, d, linearUnit, d2);
    }

    public static Point geodesicMove(Point point, SpatialReference spatialReference, double d, LinearUnit linearUnit, double d2) {
        ArrayList arrayList = new ArrayList();
        arrayList.add(point);
        return geodesicMove(arrayList, spatialReference, d, linearUnit, d2).get(0);
    }

    public static Geometry geodesicSector(Point point, SpatialReference spatialReference, double d, double d2, double d3, double d4, double d5, double d6, double d7, LinearUnit linearUnit, Geometry.Type type) {
        return GeometryEngineCore.geodesicSector(point, spatialReference, d, d2, d3, d4, d5, d6, d7, linearUnit, type);
    }

    public static Polygon geodesicSector(Point point, SpatialReference spatialReference, double d, double d2, double d3, double d4, LinearUnit linearUnit) {
        return (Polygon) GeometryEngineCore.geodesicSector(point, spatialReference, d, d2, Utils.DOUBLE_EPSILON, d3, d4, 10.0d, 10.0d, linearUnit, Geometry.Type.POLYGON);
    }

    public static Point getLabelPointForPolygon(Polygon polygon, SpatialReference spatialReference) {
        if (polygon == null || polygon.isEmpty() || spatialReference == null) {
            return null;
        }
        return GeometryEngineCore.lablePointForPolygon(polygon, spatialReference);
    }

    public static final void a() {
        f.a().initialize();
    }
}
